﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace A96判断元素是否再数组中
{
    class Program
    {
        static void Main(string[] args)
        {
            int[] array = { 3, 16, 7, 9 };
            Console.WriteLine("请输入一个数字:");
            int num = int.Parse(Console.ReadLine());
            bool b = false;
            for (int i = 0; i < array.Length; i++)
            {
                if (array[i]==num)
                {
                    b = true;
                    break;
                }
            }
            Console.WriteLine(b?"有":"没有");
        }
    }
}
